package cn.edu.nju.software.service.intf;

import java.sql.SQLException;

import javax.swing.tree.DefaultMutableTreeNode;

import cn.edu.nju.software.bean.storage.Category;

public interface CategoryService {

	/**
	 * 返回所有书籍分类
	 */
	public abstract DefaultMutableTreeNode getAllCategories() throws SQLException;

	/**
	 * 返回指定书籍分类的子分类
	 */
	public abstract DefaultMutableTreeNode getSubCategories(Category category) throws SQLException;
	
	/**
	 * 添加书籍分类
	 */
	public abstract int addCategory(Category category) throws SQLException;
	
	/**
	 * 删除书籍分类
	 */
	public abstract boolean deleteCategory(int categoryID) throws SQLException;
	
	/**
	 * 修改书籍分类信息
	 */
	public abstract boolean modifyCategoryInfo(Category category) throws SQLException;
}
